<style>
  .select-goods{
    margin-top: 10px;
    clear: both;
    border-bottom: 1px solid #ebebeb;
    height: 30px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .select-goods input[type=text] {
    width: 60px;
    float: left;
    margin-right: 10px;
  }
  .select-goods .goods-edit{
    width: 40px;
    float: left;
    height: 30px;
  }
  .select-goods .goods-title{
    width:250px;
    float: left;
    margin-right: 10px;
    white-space: nowrap; text-overflow: ellipsis; overflow: hidden; -o-text-overflow: ellipsis;
  }
  .select-goods .goods-price{
    width:80px;
    float: left;
    margin-right: 10px;
  }
  .select-goods .goods-discount{
    width:80px;
    float: left;
    margin-right: 10px;
  }
  .select-goods .goods-sale{
    width:80px;
    float: left;
  }
</style>
<div style="padding:10px;">
  {if $method == 'category'}
  请选择分类:
  <select id="category3" class="js_category">
    <option value="-1">请选择分类</option>
    {foreach $list as $k=>$v}
    <option value="{$v.id}">{$v.title}</option>
    {/foreach}
  </select>
  {else}
  {if $list}
  请选择关联商品:
  <div id="js_sltRelationGoods">
    <div class="select-goods" style="border-top: 1px solid #ebebeb;">
      <div class="goods-edit">操作</div>
      <div class="goods-title">标题</div>
      <div class="goods-price">一口价</div>
      <div class="goods-sale">优惠价格</div>
    </div>
    {foreach $list as $k=>$v}
    <div class="select-goods" data-id="{$v.id}">
      <div class="goods-edit" data-price="{$v.price}">
        <input type="checkbox" value="{$v.id}" class="js_goodsIds" />
      </div>
      <div class="goods-title">{$v.title}</div>
      <div class="goods-price">{$v.price}</div>
      <div class="goods-sale" style="display: none;">
        <input type="text" data-price="{$v.price}" class="js_goodsSale goodsSale{$v.id}" placeholder="0">
      </div>
    </div>
    {/foreach}
  </div>
  {else}
  暂无可用商品
  {/if}
  {/if}
</div>